<?php
if(!isset($GLOBALS['_vars'])) $GLOBALS['_vars'] = array(); 
$fields = array();
?>﻿
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title><?php echo $cfg_webname; ?> -注册详情</title>

<script type="text/javascript" src="../../js/jquery.min.js"></script>

<link href="/css/zcxq.css" type="text/css" rel="stylesheet" />

<link rel="stylesheet" type="text/css" href="/sec/css/reveal.css">
<link href="/css/sn_info.css" type="text/css" rel="stylesheet" />
<script language="javascript" src="/sec/js/jquery-1.7.1.min.js"></script>

<script language="javascript" src="/sec/js/jquery.reveal.js"></script>

<style>

*{

	padding:0px;

	margin:0px;

}

html{

	background:#FFF;

}

body{

	font:12px Verdana,Arial,Tahoma;

}



 .export{

  float:right;

  margin-right:0px;

  padding:5px;

  margin-left:7px; margin-top:5px; margin-bottom:5px;

  background:#d7000f; color:#fff!important;

  }

.export a{ color:#fff;}

</style>

</head>

<body  style="background:#FFFFFF">

<div id="zhuowei1"><p class="zw">桌位</p>

	<form action="sn_info.php" method="post" name="zw" style="float:left;" class="zhuowei-form">

	        <input type='hidden' name='action' value='zhuowei' />

		<span><select name="zhuowei" id="zhuowei" size="30">

		<!-- <option value="主" >主</option> -->

<?php   
    $sql="SELECT * FROM `20191130qiandao` where uname != '' and msg != '' order by msg asc ";
   $dsql->SetQuery($sql);
        $dsql->Execute();
        while($row=$dsql->GetObject()){
          $sn_zw[$row->msg] = $row->msg;
        }
        //var_dump($sn_zw);
        foreach ($sn_zw as $key => $value  ){

?>

		<option value="<?php echo $value ?>" ><?php echo $value ?></option>

<?php   
  }
?>

 		</select></span>

		<span> <input class="dc-btn" type="submit" value="提交" /></span>

</form>
    <form action="/sn_index.php" method="post" id="from">

      <input type="hidden" name="id" />

    </form>

 <!-- 桌位号？ -->

</div>

 <div class="w960 clear center mt1">

  <div class="sp-title" style="text-align:center">

    <h2><!-- <a href="/plus/qiandaoadm.php" >签到详情</a> -->&nbsp;&nbsp;注册详情</h2>

  </div>

  <div style="text-align:center;width:80%; float:left;height:28px; margin-bottom:20px; vertical-align:middle;">

	<form action="sn_info.php" method="post" style="float:left;">

	        <input type='hidden' name='action' value='search' />

         姓名：<input type="text" value="" name="uname"  />  

		  <input class="dc-btn" type="submit" value="搜索" />

</form>

  <form class="form1" name="form2" id="form2" method="post" style="float:right; margin-left:30px;" action="/plus/sn_info_dx.php">

            	<input type='hidden' name='action' value='dx' />

				 <input   class="export"  type="submit" value="一键发送短信" />

</form>

  <form action="/sn_index.php?action=export" method="post">

         <input type="hidden" value="姓名" name="uname"  />

        <input type="hidden" value="电话" name="qq"  />

        <input type="hidden" value="微信昵称" name="email"  />

    	<input type="hidden" value="桌位号" name="msg"  />

        <input type="hidden" value="注册时间" name="dtime"  />

        <input type="hidden" value="签到时间" name="posttime"  />

     <input class="export" data-reveal-id="myModal" data-animation="none" type="submit" value=" 导 出 " />

</form> 

 <a href="#" data-reveal-id="myModal2" data-animation="none" class="export">导入excel</a>

    <form action="/sn_index.php" method="post" id="from">

      <input type="hidden" name="id" />

    </form>
<!-- onclick='dian()' -->
<a  href='/sn/20191130qiandao/PHP/qdindex/qdindex.php'   class="export">手机管理链接</a>

<script src="/js/qrcode.min.js" type="text/javascript"></script>

<div id="qrcode" class="dian"  style="width:300px;height:300px;display: none;position: absolute;left: 40%;top: 15%;background-color:#fdfdfd;padding: 10px;"></div>

<script>

    function dian() {

        $("#qrcode").toggle();

        $(".dian").find("img").hide();

        var qrcode = new QRCode("qrcode", {

            text: "http://db.ae-foundation.com/plus/qdindex.html",

            width: 300,

            height: 300,

            colorDark: '#000',

            colorLight: "#ffffff"

        });

      

    }

</script>

<script src="/js/jquery-1.11.1.min.js" type="text/javascript"></script>

<script src="/js/jquery.fancybox.js" type="text/javascript"></script>

 </div>

  <?php 

  $ntt=0;

  $bgcc = '#FBFEED';

  ?>

 <table width="90%" border="0" bordercolor="#fafafa" cellpadding="2" cellspacing="1" class="zcxxtable" align="center" style="margin-top:8px; border:1px solid #cdcdcd; margin-left:10px;">

 <tr align="center" bgcolor="#d7000f"  style="color:#fff" height="36" >

	<td>姓名</td>
    <td>照片</td>
	<td>手机号</td>
	<td>微信昵称</td>
    <td>微信头像</td>
	<td>桌位安排</td>
	<td>注册时间</td>
	<td>短信通知</td>
	<td>操作</td>
</tr> 
  <?php
$atts = array();
$atts['tagname'] = 'datalist';
$blockValue = $this->refObj->GetArcList($atts,$this->refObj,$fields); 
if(is_array($blockValue)){
foreach( $blockValue as $key=>$fields )
{
?>

       <!-- <input type="hidden" name="id" id="id1" value="<?php echo $fields['id']; ?>"> -->

        <tr bgcolor="#efefef" height="28">

        <td align="center" ><?php echo $fields['uname']; ?></td>
        <td align="center" ><img  width="50px"  height="50px" src="/sn/20191130qiandao/PHP/<?php echo $fields['sn_up_pic']; ?>" alt="" /> </td>

        <td align="center"><?php echo $fields['tell']; ?></td>    

		    <td align="center">

          <?php echo $fields['w_nickname']; ?>   

        </td> 
    <td align="center">
<img src="<?php echo $fields['w_headimgurl']; ?>" width="50px"  height="50px"  alt="" />
             

        </td> 
        <input type="hidden" name="id" id="id1" value="<?php echo $fields['id']; ?>">   

        <td align="center">

            <!-- <?php echo $fields['msg']; ?> -->

            <span id='mg'><?php echo $fields['msg']; ?><img src="../../images/gtk-edit.png" style="float: right;"></span>

            <input type="hidden" name="msg" class="msg1" value="<?php echo $fields['msg']; ?>">

        </td>

        <td  align="center"><?php echo MyDate('Y-m-d H:i',$fields['qiandaotime']); ?></td>

		<td  id="dxzt"  align="center">

		<?php if($fields['dxstate'] == '1') { ?>

              <span style="color:green" id="<?php echo $fields['id']?>" name="<?php echo $fields['dxstate']?>">√</span>

        <?php } else { ?>

              <span style="color:red" id="<?php echo $fields['id']?>" name="<?php echo $fields['dxstate']?>">×</span>

        <?php } ?>

		</td>	

        <td height="26" align="center" >

      		<?php if($g_isadmin) { ?>

      		<a href='sn_info.php?action=admin&id=<?php echo $fields['id']; ?>&job=del'><img src='sn_info/images/del.gif' border=0 height=16 width=16 />[删除]</a>

      	  <?php }  ?>

      	</td>

      </tr>

    <?php if($ntt==0){$ntt=1;}else{ $ntt=0; } 
}
}?> </table>

   <table border='0' cellpadding='0' cellspacing='0'  width="100%"  align='center' class='pagetable'>

    <tr align="right" bgcolor="#Fafafa">

	<td height="28" colspan="10" align="center">

		<?php
$atts = array();
$atts['tagname'] = 'pagelist';
$atts['listsize'] = '3';
 echo $this->refObj->GetPageList($atts,$this->refObj,$fields); 
?>


	</td>

</tr>

   </table>

<script>

  //短信状态

$(document).on('click','#dxzt',function(){

      var obj = $(this);

      var id    = obj.children().attr('id');

      var state = obj.children().attr('name');

	  var action='dxzt';

      $.ajax({

            url:"sn_info.php",

            type:"post",

            dataType:"json",

            data:{

                state:state,

                id:id,

				action:action

            },

           success:function(result){

              if (result != true) {

                 alert('短信状态修改失败');;

              }

              if (state == '1') {

                obj.children().replaceWith("<span style='color:red' id="+id+" name='0'>×</span>");

              }else{

                obj.children().replaceWith("<span style='color:green' id="+id+" name='1'>√</span>");

              }

           }

      })

})

// $("#dxzt").click(function(){

// 	// $.post("/plus/sn_info.php",

//  //    {

//  //        id:id, 

// 	// 			state:state, 

// 	// 			action:"dx",

//  //    });	

// }); 

    $(document).on('click','#mg',function(){

          var obj = $(this);

          var title = obj.text();

          obj.hide();

          obj.next().attr('type','text').val(title);  

     })

    $(document).on('blur',".msg1",function(){

          var obj = $(this); 

          var msg = obj.val();

          var id = obj.parent().prev().val();

          $.ajax({

               url:"sn_info.php",

               type:"get",

               dataType:"json",

               data:{

                  msg:msg,

                  id:id

               },

               success:function(result){

                  // console.log(result);

                  // if(result != true){

                  //     alert('修改失败');

                  // }else{

                  //     alert('修改成功');

                  // }     

              }

          })

          var m = obj.val()+'<img src="../../images/gtk-edit.png" style="float: right;">';

          obj.prev().html(m);

          obj.attr('type','hidden');

          obj.prev().show();

    })

</script>

<script language="javascript" src="js/jquery-1.11.3.min.js"></script>

<script language="javascript" src="js/jquery.reveal.js"></script>

   <table width="100%" border="0" cellspacing="1" cellpadding="4" align="center" bgcolor="#dedede" class='writetable' >

      <form method="post" action="sn_info.php" enctype="multipart/form-data" name="form1">

        <input type='hidden' name='action' value='save' />

        <tr bgcolor="#d7000f">

          <td colspan='4' class='writetd' style="color:#fff">新增用户：<a name='write'></a></td>

        </tr>

        <tr bgcolor="#ffffff">

          <td width="10%" align="center" nowrap><font color="#FF0000">*</font>姓名：</td>

          <td width="40%"><input type="text" maxlength="10" name="name" size="30" value="" class="ipt-txt"/></td>

          <td width="10%" align="center" nowrap><font color="#FF0000"></font>电话：</td>

          <td width="40%"><input maxlength="20" type="text" name="tel" size="20" class="ipt-txt" /></td>

        </tr>
        <tr bgcolor="#ffffff">

          <td width="10%" align="center" nowrap><font color="#FF0000">*</font>照片：</td>
          <td width="40%"><input type="file" name="sn_img" size="30" value="" class="ipt-txt"/></td>
          <td></td>
          <td></td>
        </tr>

        <tr bgcolor="#ffffff">

          <td colspan="4" align="center" nowrap><input maxlength="1000" type="submit" name="Submit" value="提 交" class="btn-2" />

            &nbsp;&nbsp;

            <input type="reset" name="Submit2" value="取 消" class="btn-2" /></td>

        </tr>

      </form>

    </table>

   <br />

</div>

</div>



<!--导入-->

<div id="myModal2" class="reveal-modal leading">

<p class="title">选择文档</p>

     <form name="upfile" id="upfile" class="drform" action="/sn_index.php?action=eximp" method="post" enctype="multipart/form-data">

	 <input type="hidden" name="uid" value="3" /> 

		          <input type="file" id="import" name="import" class="np"/> 

		 		  <input type="submit" value="导入"  onchange="upfileSubmit()" onclick="return upfileSubmit()" class="drbtn"/> 

		       </form>

<a href="" class="close close-reveal-modal"><img src="images/tc_01.jpg" width="15" height="15"></a>

</div>

<!--导入-->

<script language="javascript" src="/js/export.js"></script>



</body>

</html>